package omq.constants;

public class OmqConstants {	
	//Request URL.
	public static String OMQ_URL = "http://www.staging.onlinemq.com/webservice_soap/api";
	//Request header constants.
	public static String REQUEST_HEADER_KEY = "Content-Type";
	public static String REQUEST_HEADER_VALUE = "application/xml";
	public static String PROP_OMQ_URL = "omq.ml.addr";
	public static String PROP_OMQ_PORT = "omq.ml.port";

	//Document elements
	public static String DOCUMENT_ROOT_TAG = "onlinemq";
	
	public static String HEADER_ELEMENT = "header";
	public static String HEADER_ACTION_ELEMENT = "action";
	public static String HEADER_VERSION_ELEMENT = "version";
	public static String HEADER_VERSION_VALUE = "0.1";
	
	
	public static String AUTHZ_ELEMENT = "authentication";
	public static String AUTHZ_USER_ELEMENT = "login";
	public static String AUTHZ_PASSWORD_ELEMENT = "password";
	
	public static String AUTHZ_USER_VALUE = "user";
	public static String AUTHZ_PASSWORD_VALUE = "password";
	
	public static String QUEUE_MANAGER_ELEMENT = "queue_manager";
	public static String QUEUE_MANAGER_NAME_ELEMENT = "name";
	public static String QUEUE_ELEMENT = "queue";
	public static String QUEUE_NAME_ELEMENT = "name";
	public static String MESSAGE_ELEMENT = "message";
	public static String MESSAGE_BODY_ELEMENT = "body";
	public static String MESSAGE_ID_ELEMENT = "id";
	
	public static String SESSION_ELEMENT = "session";
	public static String SESSION_ID_ELEMENT = "id";
	public static String SESSION_IS_TRANSACTION_ELEMENT = "transactional";
	public static String SESSION_NUM_OF_MESSAGES_ELEMENT = "number_of_messages";
	//Map params names
	public static String MAP_PARAM_USER = "user";
	public static String MAP_PARAM_PASSWORD = "password";
	public static String MAP_PARAM_ACTION = "action";
	public static String MAP_PARAM_QMGR_NAME = "queueMgr";
	public static String MAP_PARAM_QUEUE_NAME = "queue";
	public static String MAP_PARAM_MESSAGE_CONTENT = "message";
	public static String MAP_PARAM_MESSAGE_ID = "msg_id";
	public static String MAP_PARAM_SESSION_ID = "session_id";
	public static String MAP_PARAM_SESSION_TRANSACTIONAL = "transactional";
	public static String MAP_PARAM_SESSION_NUM_OF_MSGS = "session_num_of_msgs";
	public static String FILE_PATH = "response_path";
	public static String FILE_NAME = "response_file_name";
	public static String URL_PARAM = "url";
	
	//OMQ action values
	public static String ACTION_OPEN_CONN = "open_connection";
	public static String ACTION_CLOSE_CONN = "close_connection";
	public static String ACTION_CHECK_CONN = "check_connection";
	public static String ACTION_CREATE_Q = "";
	public static String ACTION_UPDATE_Q = "";
	public static String ACTION_DELETE_Q = "";
	public static String ACTION_SHOW_Q = "";
	public static String ACTION_OPEN_SESSION = "open_session";
	public static String ACTION_CLOSE_SESSION = "close_session";
	public static String ACTION_SEND_MESSAGE = "send_message";
	public static String ACTION_RECIEVE_MESSAGE = "receive_message";
	public static String ACTION_PEEK_MESSAGE = "peek_message";
	public static String ACTION_DELETE_MESSAGE = "delete_message";
	public static String ACTION_TR_SEND_MSG = "send_message_transactional";
	public static String ACTION_TR_RECIEVE_MSG = "receive_message_transactional";
	public static String ACTION_TR_DELETE_MSG = "delete_message_transactional";
	public static String ACTION_TR_COMMIT = "commit_session";
	public static String ACTION_TR_ROLLBACK = "rollback_session";
	//Response constants
	public static String RESPONSE_STATUS_XPATH = "onlinemq/status";
	public static String RESPONSE_CODE = "error_code";
	public static String RESPONSE_DESC = "error_description";
	public static String RESPONSE_MESSAGE_XPATH = "onlinemq/queue_manager/queue/message";
	public static String RESPONSE_MESSAGE_ID = "id";
	public static String RESPONSE_MESSAGE_BODY = "body";
	public static String RESPONSE_SESSION_XPATH = "onlinemq/session";
	public static String RESPONSE_SESSION_ID = "id";
	public static String RESPONSE_SESSION_TRANSACTIONAL = "transactional";
	public static String RESPONSE_SESSION_NUM_OF_MSGS = "number_of_messages";
	
	
	/**
	 * Properties reader constants
	 */
	public final static String PROPERTIES_FILE_NOT_READ_ERROR = "The properties file could not be read";
    public final static String PROPERTIES_FILE_NOT_LOADED_ERROR = "The properties file could not be loaded";
    public final static String PROPERTY_NOT_FOUND_PART1 = "The property ";
    public final static String PROPERTY_NOT_FOUND_PART2 = " was not found in properties file ";
    
    public final static String PROPERTY_CONN_TYPE = "omq.connection";
}

